package com.di.base.feign;

import com.di.base.common.dto.AccountRequestDTO;
import com.di.base.config.SeataFeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "account-service", url = "http://192.168.1.2:8082", configuration = SeataFeignConfiguration.class,fallback = Exception.class)
public interface AccountFeignClient {

    @PostMapping("/account/decrease")
    void decrease(@RequestBody AccountRequestDTO request);

    @PostMapping("/account/increase")
    void increase(@RequestBody AccountRequestDTO request);
}